﻿using QLBH.DATA;
using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.BUSINESS
{
    public class PhieuNhapBus
    {
        private static PhieuNhapData db = new PhieuNhapData();
        public static string MA_PN { set; get; }
        public static string ThemMoi(PHIEUNHAPPARAM PHIEUNHAP)
        {
            
            if (db.ThemMoi(PHIEUNHAP))
            {
                MA_PN = db.Result;
                return "1";
            }
            else
                return db.Error;
        }

        public static List<PHIEU_NHAP> TimPhieuNhapTheoMa(string ma_phieu_nhap, int tong_so_dong)
        {
            return db.TimPhieuNhapTheoMa(ma_phieu_nhap, tong_so_dong);
        }

        public static PHIEU_NHAP TimPhieuNhapTheoMa(string ma_phieu_nhap)
        {
            return db.TimPhieuNhapTheoMa(ma_phieu_nhap);
        }
    }
}